//
//  FCIDiscoverViewController.swift
//  YQInformation
//
//  Created by Max on 2017/11/2.
//  Copyright © 2017年 com.vector. All rights reserved.
//

import UIKit

class FCIDiscoverViewController: FQIViewController {

    var rcs = RCSegmentView()
    let HEIGHT = UIScreen.main.bounds.height
    let WIDTH = UIScreen.main.bounds.width
    var controllers = [UIViewController]()


    @IBOutlet weak var oneButton: UIButton!
    @IBOutlet weak var twoButton: UIButton!
    @IBOutlet weak var threeButton: UIButton!
    @IBOutlet weak var markImage: UIImageView!
    
    
    @IBOutlet var backView: UIView!

    override func viewDidLoad() {
        super.viewDidLoad()

        if self.navigationItem.leftBarButtonItem != nil {
            let btn = UIButton(type: UIButtonType.custom)
            self.navigationItem.leftBarButtonItem = UIBarButtonItem(customView: btn)
        }
        
        
        
        
        
        
        
        if let v = FQIDiscoverCompositeViewController.create() as? FQIDiscoverCompositeViewController {
            controllers.append(v)
        }
        
        if let v = FQIDiscoverInterestateViewController.create() as? FQIDiscoverInterestateViewController {
            controllers.append(v)
        }
        
        if let v = FQIDiscoverLendViewController.create() as? FQIDiscoverLendViewController {
            controllers.append(v)
        }
        
        if let v = FQIDiscoverThroughViewController.create() as? FQIDiscoverThroughViewController {
            controllers.append(v)
        }
        
        let titleArray: [String] = ["综合排序", "利率最低", "放款最快", "通过率高"]
        rcs = RCSegmentView(frame: CGRect(x: CGFloat(0), y: CGFloat(110), width: CGFloat(WIDTH), height: CGFloat(HEIGHT)), controllers: controllers, titleArray: titleArray, parentController: self)
        view.addSubview(rcs)

    }

    
    override func viewWillAppear(_ animated: Bool) {
        

    }
    
    
    
    @IBAction func professionalAction(_ sender: UIButton) {
    
          }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
}
